This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Ctrl+Shift+Enter.
# Sys.setenv(CKAN_API_KEY = "522bd094-7f62-4c3b-914d-bf6f0a20dc94")
source("get_wage.R")
source("helpers.R")
source("list_wage_occupations.R")
source("salary_range.R")
source("map.R")
source("wage_trend.R")
source("D:/MDS/block4/Data534/project/get_wage/Data534-Project/tests/testthat.R")
-- Error: test the overall -----------------------------------------------------
Error in `trend("overall")`: argument "type" is missing, with no default
Backtrace:
x
1. \-global trend("overall") at Data534-Project/tests/testthat.R:13:2
错误: Test failed
records=get_wage(c("2012","2013","2016","2019","2020","2021","2022","2023"))
records
trend(records,"overall")
trend(records,"specific")
# install.packages("covr")
library(covr)
report()
map(records,2023,"Legislators")
The rnaturalearthhires package needs to be installed.
Install the rnaturalearthhires package?
1: Yes
2: No
Yes
Installing the rnaturalearthhires package.
Downloading GitHub repo ropensci/rnaturalearthhires@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: sp (2.1-2 -> 2.1-3) [CRAN]
1
sp (2.1-2 -> 2.1-3) [CRAN]
Installing 1 packages: sp
将程序包安装入‘C:/Users/Administrator/AppData/Local/R/win-library/4.3’
(因为‘lib’没有被指定)
试开URL’https://cran.rstudio.com/bin/windows/contrib/4.3/sp_2.1-3.zip'
Content type 'application/zip' length 2086129 bytes (2.0 MB)
downloaded 2.0 MB
程序包‘sp’打开成功,MD5和检查也通过
下载的二进制程序包在
C:\Users\Administrator\AppData\Local\Temp\RtmpE7vMAV\downloaded_packages里
── R CMD build ──────────────────────────────────────────────────────────────────────────────────────
✔ checking for file 'C:\Users\Administrator\AppData\Local\Temp\RtmpE7vMAV\remotes39cc5eb91256\ropensci-rnaturalearthhires-db8e433/DESCRIPTION' (620ms)
─ preparing 'rnaturalearthhires':
checking DESCRIPTION meta-information ...
checking DESCRIPTION meta-information ...
✔ checking DESCRIPTION meta-information
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building 'rnaturalearthhires_1.0.0.tar.gz'
将程序包安装入‘C:/Users/Administrator/AppData/Local/R/win-library/4.3’
(因为‘lib’没有被指定)
* installing *source* package 'rnaturalearthhires' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (rnaturalearthhires)
Warning: Ignoring unknown aesthetics: textWarning: st_point_on_surface may not give correct results for longitude/latitude data